package com.gxuwz.eschool.fragment;

import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.gxuwz.eschool.AllApplicationActivity;
import com.gxuwz.eschool.BookkingActivity;
import com.gxuwz.eschool.R;

//易记账-账单明细
public class BookkingFragment extends Fragment {


    private ImageView iv_back;

    public BookkingFragment() {
        // Required empty public constructor
    }



    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_bookking, container, false);
        iv_back = rootView.findViewById(R.id.iv_back);
        iv_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                // 获取当前Activity的Intent
                Intent intent = getActivity().getIntent();
                Class<?> previousActivityClass = AllApplicationActivity.class;
                intent.setComponent(new ComponentName(getActivity(), previousActivityClass));
                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // 清除当前Activity之上的所有Activity

                // 启动意图
                startActivity(intent);
            }
        });

        return rootView;
    }
}